diff --git a/tools/Makefile b/tools/Makefile
index 35c60b6..de6f7dd 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -186,4 +186,3 @@
 sinclude .depend
 
 #########################################################################
-
diff --git a/tools/bmp_logo.c b/tools/bmp_logo.c
index 54fdcff..2421b82 100644
--- a/tools/bmp_logo.c
+++ b/tools/bmp_logo.c
@@ -68,8 +68,8 @@
 		exit (EXIT_FAILURE);
 	}
 
-        /*
-         * read width and height of the image, and the number of colors used;
+	/*
+	 * read width and height of the image, and the number of colors used;
 	 * ignore the rest
 	 */
 	skip_bytes (fp, 16);
@@ -174,4 +174,3 @@
 
 	return (0);
 }
-
diff --git a/tools/easylogo/easylogo.c b/tools/easylogo/easylogo.c
index 3111068..cbec70b 100644
--- a/tools/easylogo/easylogo.c
+++ b/tools/easylogo/easylogo.c
@@ -107,7 +107,7 @@
 		printf(" ");
 	    else
 		printf("X");
-        printf("\n");
+	printf("\n");
     }
 }
 
@@ -121,7 +121,7 @@
 		printf(" ");
 	    else
 		printf("X");
-        printf("\n");
+	printf("\n");
     }
 }
 
@@ -134,7 +134,7 @@
     rgb_t *p ;
 
     if( ( file = fopen( filename, "rb" ) ) == NULL )
-    	return -1;
+	return -1;
 
     fread(&header, sizeof(header), 1, file);
 
@@ -146,7 +146,7 @@
 			image->yuyv = 0 ;
 			image->palette_size = 0 ;
 			image->palette = NULL ;
-    	    break;
+	    break;
 
 	default:
 	    printf("Format not supported!\n");
@@ -181,19 +181,19 @@
 
     if(!(header.ImageDescriptorByte & 0x20))
     {
-    	unsigned char *temp = malloc(image->size);
-    	int linesize = image->pixel_size * image->width ;
+	unsigned char *temp = malloc(image->size);
+	int linesize = image->pixel_size * image->width ;
 	void	*dest = image->data,
 		*source = temp + image->size - linesize ;
 
-        printf("S");
+	printf("S");
 	if (temp == NULL)
 	{
 	    printf("Cannot alloc temp buffer!\n");
 	    return -1;
 	}
 
-    	memcpy(temp, image->data, image->size);
+	memcpy(temp, image->data, image->size);
 	for(i = 0; i<image->height; i++, dest+=linesize, source-=linesize)
 	    memcpy(dest, source, linesize);
 
@@ -242,7 +242,7 @@
 		pixel_rgb_to_yuyv (rgb_ptr++, &yuyv);
 
 		if ((count & 1)==0)	/* Was == 0 */
-	    	    memcpy (dest, ((void *)&yuyv) + 2, sizeof(short));
+		    memcpy (dest, ((void *)&yuyv) + 2, sizeof(short));
 		else
 		    memcpy (dest, (void *)&yuyv, sizeof(short));
 
@@ -346,7 +346,7 @@
     case 2:
     case 3:
     case 4:
-        strcpy (inputfile, 	argv[1]);
+	strcpy (inputfile, 	argv[1]);
 
 	if (argc > 2)
 	    strcpy (varname, 	argv[2]);
@@ -375,14 +375,14 @@
 		sprintf(outputfile, "%s.h", app);
 	    }
 	}
-        break;
+	break;
 
     default:
-        printf("EasyLogo 1.0 (C) 2000 by Paolo Scaffardi\n\n");
+	printf("EasyLogo 1.0 (C) 2000 by Paolo Scaffardi\n\n");
 
-        printf("Syntax:	easylogo inputfile [outputvar {outputfile}] \n");
-        printf("\n");
-        printf("Where:	'inputfile' 	is the TGA image to load\n");
+	printf("Syntax:	easylogo inputfile [outputvar {outputfile}] \n");
+	printf("\n");
+	printf("Where:	'inputfile' 	is the TGA image to load\n");
 	printf("      	'outputvar' 	is the variable name to create\n");
 	printf("       	'outputfile' 	is the output header file (default is 'inputfile.h')\n");
 
@@ -398,7 +398,7 @@
     if (image_load_tga (&rgb_logo, inputfile)<0)
     {
 	printf("input file not found!\n");
-    	exit(1);
+	exit(1);
     }
 
 /* Convert it to YUYV format */
diff --git a/tools/env/Makefile b/tools/env/Makefile
index 7da1d2b..9ce477c 100644
--- a/tools/env/Makefile
+++ b/tools/env/Makefile
@@ -43,4 +43,3 @@
 sinclude .depend
 
 #########################################################################
-
diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h
index 2cc7724..cc2ff09 100644
--- a/tools/env/fw_env.h
+++ b/tools/env/fw_env.h
@@ -21,8 +21,8 @@
  * MA 02111-1307 USA
  */
 
-/* 
- * To build the utility with the run-time configuration 
+/*
+ * To build the utility with the run-time configuration
  * uncomment the next line.
  * See included "fw_env.config" sample file (TRAB board)
  * for notes on configuration.
diff --git a/tools/envcrc.c b/tools/envcrc.c
index 19fe17c..5f13a63 100644
--- a/tools/envcrc.c
+++ b/tools/envcrc.c
@@ -94,4 +94,3 @@
 #endif
     return EXIT_SUCCESS;
 }
-
diff --git a/tools/gdb/remote.c b/tools/gdb/remote.c
index b8b2470..f40b6c6 100644
--- a/tools/gdb/remote.c
+++ b/tools/gdb/remote.c
@@ -171,7 +171,7 @@
 	reply		OK		for success
 			ENN		for an error
 
-        write reg	Pn...=r...	Write register n... with value r...,
+	write reg	Pn...=r...	Write register n... with value r...,
 					which contains two hex digits for each
 					byte in the register (target byte
 					order).
@@ -194,12 +194,12 @@
 					where only part of the data was
 					written).
 
-        write mem       XAA..AA,LLLL:XX..XX
-         (binary)                       AA..AA is address,
-                                        LLLL is number of bytes,
-                                        XX..XX is binary data
-        reply           OK              for success
-                        ENN             for an error
+	write mem       XAA..AA,LLLL:XX..XX
+	 (binary)                       AA..AA is address,
+					LLLL is number of bytes,
+					XX..XX is binary data
+	reply           OK              for success
+			ENN             for an error
 
 	continue	cAA..AA		AA..AA is address to resume
 					If AA..AA is omitted,
@@ -217,7 +217,7 @@
 	signal
 
 	last signal     ?               Reply the current reason for stopping.
-                                        This is the same reply as is generated
+					This is the same reply as is generated
 					for step or cont : SAA where AA is the
 					signal number.
 
@@ -256,7 +256,7 @@
 					the 'N' packet may arrive spontaneously
 					whereas the 'qOffsets' is a query
 					initiated by the host debugger.
-        or...           OXX..XX	XX..XX  is hex encoding of ASCII data. This
+	or...           OXX..XX	XX..XX  is hex encoding of ASCII data. This
 					can happen at any time while the
 					program is running and the debugger
 					should continue to wait for
@@ -416,7 +416,7 @@
       && remote_address_size < (sizeof (ULONGEST) * 8))
     {
       /* Only create a mask when that mask can safely be constructed
-         in a ULONGEST variable. */
+	 in a ULONGEST variable. */
       ULONGEST mask = 1;
       mask = (mask << remote_address_size) - 1;
       addr &= mask;
@@ -529,8 +529,8 @@
       *p = '\0';
 
       /* We send target system values byte by byte, in increasing byte
-         addresses, each byte encoded as two hex characters (or one
-         binary character).  */
+	 addresses, each byte encoded as two hex characters (or one
+	 binary character).  */
       if (remote_binary_download)
 	{
 	  int escaped = 0;
@@ -557,11 +557,11 @@
 	  if (i < todo)
 	    {
 	      /* Escape chars have filled up the buffer prematurely,
-	         and we have actually sent fewer bytes than planned.
-	         Fix-up the length field of the packet.  */
+		 and we have actually sent fewer bytes than planned.
+		 Fix-up the length field of the packet.  */
 
 	      /* FIXME: will fail if new len is a shorter string than
-	         old len.  */
+		 old len.  */
 
 	      plen += hexnumstr ((char *)plen, (ULONGEST) i);
 	      *plen++ = ':';
@@ -591,7 +591,7 @@
 	}
 
       /* Increment by i, not by todo, in case escape chars
-         caused us to send fewer bytes than we'd planned.  */
+	 caused us to send fewer bytes than we'd planned.  */
       myaddr += i;
       memaddr += i;
       len -= i;
@@ -743,10 +743,10 @@
 
 #if 0
       /* This is wrong.  If doing a long backtrace, the user should be
-         able to get out next time we call QUIT, without anything as
-         violent as interrupt_query.  If we want to provide a way out of
-         here without getting to the next QUIT, it should be based on
-         hitting ^C twice as in remote_wait.  */
+	 able to get out next time we call QUIT, without anything as
+	 violent as interrupt_query.  If we want to provide a way out of
+	 here without getting to the next QUIT, it should be based on
+	 hitting ^C twice as in remote_wait.  */
       if (quit_flag)
 	{
 	  quit_flag = 0;
@@ -875,12 +875,12 @@
   for (tries = 1; tries <= MAX_TRIES; tries++)
     {
       /* This can loop forever if the remote side sends us characters
-         continuously, but if it pauses, we'll get a zero from readchar
-         because of timeout.  Then we'll count that as a retry.  */
+	 continuously, but if it pauses, we'll get a zero from readchar
+	 because of timeout.  Then we'll count that as a retry.  */
 
       /* Note that we will only wait forever prior to the start of a packet.
-         After that, we expect characters to arrive at a brisk pace.  They
-         should show up within remote_timeout intervals.  */
+	 After that, we expect characters to arrive at a brisk pace.  They
+	 should show up within remote_timeout intervals.  */
 
       do
 	{
diff --git a/tools/img2srec.c b/tools/img2srec.c
index 330ae02..b04abbd 100644
--- a/tools/img2srec.c
+++ b/tools/img2srec.c
@@ -351,34 +351,34 @@
   loadAddr  =  0;
   for (i = 0; i < elfHeader.e_shnum; i++) {
     if (    (sectHeader[i].sh_type == SHT_PROGBITS)
-         && (sectHeader[i].sh_size != 0)
-         ) {
+	 && (sectHeader[i].sh_size != 0)
+	 ) {
       loadSize = sectHeader[i].sh_size;
       if (sectHeader[i].sh_flags != 0) {
-        loadAddr = sectHeader[i].sh_addr;
-        loadDiff = loadAddr - sectHeader[i].sh_offset;
+	loadAddr = sectHeader[i].sh_addr;
+	loadDiff = loadAddr - sectHeader[i].sh_offset;
       } /* if */
       else {
-        loadAddr = sectHeader[i].sh_offset + loadDiff;
+	loadAddr = sectHeader[i].sh_offset + loadDiff;
       } /* else */
 
       if (loadAddr < firstAddr)
-        firstAddr = loadAddr;
+	firstAddr = loadAddr;
 
       /* build s-records */
       loadSize = sectHeader[i].sh_size;
       fseek(file, sectHeader[i].sh_offset, SEEK_SET);
       while (loadSize) {
-        rxCount = fread(rxBlock, 1, (loadSize > 32) ? 32 : loadSize, file);
-        if (rxCount < 0) {
-          fclose(file);
-          fprintf (stderr, "*** illegal file format\n");
-        return;
-        } /* if */
-        (void)BuildSRecord(srecLine, 3, loadAddr + loadOffset, rxBlock, rxCount);
-        loadSize -= rxCount;
-        loadAddr += rxCount;
-        printf("%s\r\n",srecLine);
+	rxCount = fread(rxBlock, 1, (loadSize > 32) ? 32 : loadSize, file);
+	if (rxCount < 0) {
+	  fclose(file);
+	  fprintf (stderr, "*** illegal file format\n");
+	return;
+	} /* if */
+	(void)BuildSRecord(srecLine, 3, loadAddr + loadOffset, rxBlock, rxCount);
+	loadSize -= rxCount;
+	loadAddr += rxCount;
+	printf("%s\r\n",srecLine);
       } /* while */
     } /* if */
   } /* for */
diff --git a/tools/scripts/README b/tools/scripts/README
index cda10a8..046c1d4 100644
--- a/tools/scripts/README
+++ b/tools/scripts/README
@@ -28,7 +28,6 @@
 have to modify them before use.
 
 
-
 Short description:
 ==================
 
@@ -40,11 +39,11 @@
 
 flash_param:
 
-        "kermit" script to automatically initialize the environment
-        variables on your target. This is most useful during
-        development when your environment variables are stored in an
-        embedded flash sector which is erased whenever you install a
-        new U-Boot image.
+	"kermit" script to automatically initialize the environment
+	variables on your target. This is most useful during
+	development when your environment variables are stored in an
+	embedded flash sector which is erased whenever you install a
+	new U-Boot image.
 
 	by Swen Anderson, 10 May 2001
 
@@ -52,9 +51,9 @@
 
 	send_cmd U_BOOT_COMMAND
 
-        "kermit" script to send a U-Boot command and print the
-        results. When used from a shell with history (like the bash)
-        this indirectly adds kind of history to U-Boot ;-)
+	"kermit" script to send a U-Boot command and print the
+	results. When used from a shell with history (like the bash)
+	this indirectly adds kind of history to U-Boot ;-)
 
 	by Swen Anderson, 10 May 2001
 
@@ -62,7 +61,7 @@
 
 	send_image FILE_NAME OFFSET
 
-        "kermit" script to automatically download a file to the
-        target using the "loadb" command (kermit binary protocol)
+	"kermit" script to automatically download a file to the
+	target using the "loadb" command (kermit binary protocol)
 
 	by Swen Anderson, 10 May 2001
diff --git a/tools/scripts/send_cmd b/tools/scripts/send_cmd
index d01efe2..4131331 100644
--- a/tools/scripts/send_cmd
+++ b/tools/scripts/send_cmd
@@ -19,4 +19,3 @@
 in 10 =>
 quit
 exit 0
-
diff --git a/tools/updater/Makefile b/tools/updater/Makefile
index a8fb4ce..21b11ca 100644
--- a/tools/updater/Makefile
+++ b/tools/updater/Makefile
@@ -29,9 +29,9 @@
 IMAGE   = updater.image
 SRC     = update.c flash.c flash_hw.c utils.c cmd_flash.c string.c ctype.c dummy.c
 ASRC    = ppcstring.S
-OBJS	= $(SRC:.c=.o) $(ASRC:.S=.o) 
+OBJS	= $(SRC:.c=.o) $(ASRC:.S=.o)
 
-LIB	= $(TOPDIR)/examples/libsyscall.a 
+LIB	= $(TOPDIR)/examples/libsyscall.a
 LIBAOBJS= $(TOPDIR)/examples/syscall.o
 LIBCOBJS=
 LIBOBJS	= $(LIBAOBJS) $(LIBCOBJS)
@@ -50,14 +50,14 @@
 	$(OBJCOPY) -O srec $(<:.o=) $@
 
 %.o: %.c
-	$(CC) $(CPPFLAGS) -c $< 
+	$(CC) $(CPPFLAGS) -c $<
 
 %.o: %.S
 	$(CC) $(CPPFLAGS) -c $<
 
 #########################################################################
 
-updater: $(OBJS) $(LIB) $(TOPDIR)/board/MAI/AmigaOneG3SE/memio.o 
+updater: $(OBJS) $(LIB) $(TOPDIR)/board/MAI/AmigaOneG3SE/memio.o
 	$(LD) -g -Ttext $(LOAD_ADDR) -o updater -e _main $(OBJS) $(LIB)  \
 	$(TOPDIR)/board/MAI/AmigaOneG3SE/memio.o
 	$(OBJCOPY) -O binary updater updater.bin
diff --git a/tools/updater/cmd_flash.c b/tools/updater/cmd_flash.c
index f3465f1..573546d 100644
--- a/tools/updater/cmd_flash.c
+++ b/tools/updater/cmd_flash.c
@@ -26,7 +26,6 @@
  */
 #include <common.h>
 #include <command.h>
-#include <cmd_boot.h>
 #include <flash.h>
 
 #if (CONFIG_COMMANDS & CFG_CMD_FLASH)
@@ -227,7 +226,7 @@
 		}
 	}
 	if (erased) {
-	    //	mon_printf ("Erased %d sectors\n", erased);
+	    /*	mon_printf ("Erased %d sectors\n", erased); */
 	} else {
 		mon_printf ("Error: start and/or end address"
 			" not on sector boundary\n");
@@ -264,8 +263,8 @@
 			if (info->flash_id == FLASH_UNKNOWN) {
 				continue;
 			}
-			//mon_printf ("%sProtect Flash Bank # %ld\n",
-			//	p ? "" : "Un-", bank);
+			/*mon_printf ("%sProtect Flash Bank # %ld\n", */
+			/*	p ? "" : "Un-", bank); */
 
 			for (i=0; i<info->sector_count; ++i) {
 #if defined(CFG_FLASH_PROTECTION)
@@ -290,9 +289,9 @@
 			mon_printf("Bad sector specification\n");
 			return 1;
 		}
-		//mon_printf("%sProtect Flash Sectors %d-%d in Bank # %d\n",
-		//	p ? "" : "Un-", sect_first, sect_last,
-		//	(info-flash_info)+1);
+		/*mon_printf("%sProtect Flash Sectors %d-%d in Bank # %d\n", */
+		/*	p ? "" : "Un-", sect_first, sect_last, */
+		/*	(info-flash_info)+1); */
 		for (i = sect_first; i <= sect_last; i++) {
 #if defined(CFG_FLASH_PROTECTION)
 			if (flash_real_protect(info, i, p))
@@ -418,8 +417,8 @@
 
 	}
 	if (protected) {
-	    //	mon_printf ("%sProtected %d sectors\n",
-	    //	p ? "" : "Un-", protected);
+	    /*	mon_printf ("%sProtected %d sectors\n", */
+	    /*	p ? "" : "Un-", protected); */
 	} else {
 	    mon_printf ("Error: start and/or end address"
 			" not on sector boundary\n");
diff --git a/tools/updater/flash_hw.c b/tools/updater/flash_hw.c
index ec11589..1d782c6 100644
--- a/tools/updater/flash_hw.c
+++ b/tools/updater/flash_hw.c
@@ -31,7 +31,6 @@
 
 /*---------------------------------------------------------------------*/
 #undef DEBUG_FLASH
-//#define DEBUG_FLASH
 
 #ifdef DEBUG_FLASH
 #define DEBUGF(fmt,args...) mon_printf(fmt ,##args)
@@ -68,7 +67,7 @@
     unsigned char x;
 
     flash_xd_nest --;
-   
+
     if (flash_xd_nest == 0)
     {
 	DEBUGF("Flash on memory bus\n");
@@ -327,7 +326,7 @@
 			/* set sector offsets for uniform sector type	*/
 			for (i = 0; i < info->sector_count; i++) {
 				info->start[i] = base + i * info->size /
-				                            info->sector_count;
+							    info->sector_count;
 			}
 			break;
 		default:
@@ -479,7 +478,7 @@
 		}
 
 		if ((rc = write_word(info, wp, data)) != 0) {
-		        flash_to_mem();
+			flash_to_mem();
 			return (rc);
 		}
 		wp += 4;
@@ -491,7 +490,7 @@
 	 * handle word aligned part
 	 */
 	while (cnt >= 4) {
-	    if (out_cnt>26214) 
+	    if (out_cnt>26214)
 	    {
 		mon_putc(219);
 		out_cnt = 0;
@@ -590,7 +589,7 @@
  */
 static void flash_reset (ulong addr)
 {
-        flash_to_xd();
+	flash_to_xd();
 	out8(addr, 0xF0);	/* reset bank */
 	iobarrier_rw();
 	flash_to_mem();
@@ -641,10 +640,10 @@
 			info->size / 0x100000, info->sector_count);
 	} else if (info->size % 0x400 == 0) {
 		mon_printf ("  Size: %ld KB in %d Sectors\n",
-		        info->size / 0x400, info->sector_count);
+			info->size / 0x400, info->sector_count);
 	} else {
 		mon_printf ("  Size: %ld B in %d Sectors\n",
-		        info->size, info->sector_count);
+			info->size, info->sector_count);
 	}
 
 	mon_printf ("  Sector Start Addresses:");
diff --git a/tools/updater/string.c b/tools/updater/string.c
index 50537a6..8a8edec 100644
--- a/tools/updater/string.c
+++ b/tools/updater/string.c
@@ -129,8 +129,8 @@
 {
        const char *p = s + strlen(s);
        do {
-           if (*p == (char)c)
-               return (char *)p;
+	   if (*p == (char)c)
+	       return (char *)p;
        } while (--p >= s);
        return NULL;
 }
@@ -316,7 +316,7 @@
 		p++;
 		size--;
 	}
-  	return (void *) p;
+	return (void *) p;
 }
 #endif
 
diff --git a/tools/updater/update.c b/tools/updater/update.c
index 66c6dfc..26204fb 100644
--- a/tools/updater/update.c
+++ b/tools/updater/update.c
@@ -35,7 +35,7 @@
     mon_printf("\nUpdate done. Please remove diskette.\n");
     mon_printf("The machine will automatically reset in %d seconds\n", i);
     mon_printf("You can switch off/reset now when the floppy is removed\n\n");
-    
+
     while (i)
     {
 	mon_printf("Resetting in %d\r", i);
diff --git a/tools/updater/utils.c b/tools/updater/utils.c
index e230e19..0304f94 100644
--- a/tools/updater/utils.c
+++ b/tools/updater/utils.c
@@ -15,7 +15,7 @@
 static __inline__ void
 set_msr(unsigned long msr)
 {
-	asm volatile("mtmsr %0" : : "r" (msr)); 
+	asm volatile("mtmsr %0" : : "r" (msr));
 }
 
 static __inline__ unsigned long
@@ -31,7 +31,7 @@
 static __inline__ void
 set_dec(unsigned long val)
 {
-	asm volatile("mtdec %0" : : "r" (val)); 
+	asm volatile("mtdec %0" : : "r" (val));
 }
 
 
@@ -69,80 +69,80 @@
 
 unsigned long simple_strtoul(const char *cp,char **endp,unsigned int base)
 {
-        unsigned long result = 0,value;
+	unsigned long result = 0,value;
 
-        if (*cp == '0') {
-                cp++;
-                if ((*cp == 'x') && isxdigit(cp[1])) {
-                        base = 16;
-                        cp++;
-                }
-                if (!base) {
-                        base = 8;
-                }
-        }
-        if (!base) {
-                base = 10;
-        }
-        while (isxdigit(*cp) && (value = isdigit(*cp) ? *cp-'0' : (islower(*cp)
-            ? toupper(*cp) : *cp)-'A'+10) < base) {
-                result = result*base + value;
-                cp++;
-        }
-        if (endp)
-                *endp = (char *)cp;
-        return result;
+	if (*cp == '0') {
+		cp++;
+		if ((*cp == 'x') && isxdigit(cp[1])) {
+			base = 16;
+			cp++;
+		}
+		if (!base) {
+			base = 8;
+		}
+	}
+	if (!base) {
+		base = 10;
+	}
+	while (isxdigit(*cp) && (value = isdigit(*cp) ? *cp-'0' : (islower(*cp)
+	    ? toupper(*cp) : *cp)-'A'+10) < base) {
+		result = result*base + value;
+		cp++;
+	}
+	if (endp)
+		*endp = (char *)cp;
+	return result;
 }
 
 long simple_strtol(const char *cp,char **endp,unsigned int base)
 {
-        if(*cp=='-')
-                return -simple_strtoul(cp+1,endp,base);
-        return simple_strtoul(cp,endp,base);
+	if(*cp=='-')
+		return -simple_strtoul(cp+1,endp,base);
+	return simple_strtoul(cp,endp,base);
 }
 
 static inline void
 soft_restart(unsigned long addr)
 {
-        /* SRR0 has system reset vector, SRR1 has default MSR value */
-        /* rfi restores MSR from SRR1 and sets the PC to the SRR0 value */
+	/* SRR0 has system reset vector, SRR1 has default MSR value */
+	/* rfi restores MSR from SRR1 and sets the PC to the SRR0 value */
 
-        __asm__ __volatile__ ("mtspr    26, %0"         :: "r" (addr));
-        __asm__ __volatile__ ("li       4, (1 << 6)"    ::: "r4");
-        __asm__ __volatile__ ("mtspr    27, 4");
-        __asm__ __volatile__ ("rfi");
+	__asm__ __volatile__ ("mtspr    26, %0"         :: "r" (addr));
+	__asm__ __volatile__ ("li       4, (1 << 6)"    ::: "r4");
+	__asm__ __volatile__ ("mtspr    27, 4");
+	__asm__ __volatile__ ("rfi");
 
-        while(1);       /* not reached */
+	while(1);       /* not reached */
 }
 
 void
 do_reset (void)
 {
-        ulong addr;
-        /* flush and disable I/D cache */
-        __asm__ __volatile__ ("mfspr    3, 1008"        ::: "r3");
-        __asm__ __volatile__ ("ori      5, 5, 0xcc00"   ::: "r5");
-        __asm__ __volatile__ ("ori      4, 3, 0xc00"    ::: "r4");
-        __asm__ __volatile__ ("andc     5, 3, 5"        ::: "r5");
-        __asm__ __volatile__ ("sync");
-        __asm__ __volatile__ ("mtspr    1008, 4");
-        __asm__ __volatile__ ("isync");
-        __asm__ __volatile__ ("sync");
-        __asm__ __volatile__ ("mtspr    1008, 5");
-        __asm__ __volatile__ ("isync");
-        __asm__ __volatile__ ("sync");
+	ulong addr;
+	/* flush and disable I/D cache */
+	__asm__ __volatile__ ("mfspr    3, 1008"        ::: "r3");
+	__asm__ __volatile__ ("ori      5, 5, 0xcc00"   ::: "r5");
+	__asm__ __volatile__ ("ori      4, 3, 0xc00"    ::: "r4");
+	__asm__ __volatile__ ("andc     5, 3, 5"        ::: "r5");
+	__asm__ __volatile__ ("sync");
+	__asm__ __volatile__ ("mtspr    1008, 4");
+	__asm__ __volatile__ ("isync");
+	__asm__ __volatile__ ("sync");
+	__asm__ __volatile__ ("mtspr    1008, 5");
+	__asm__ __volatile__ ("isync");
+	__asm__ __volatile__ ("sync");
 
 #ifdef CFG_RESET_ADDRESS
-        addr = CFG_RESET_ADDRESS;
+	addr = CFG_RESET_ADDRESS;
 #else
-        /*
-         * note: when CFG_MONITOR_BASE points to a RAM address,
-         * CFG_MONITOR_BASE - sizeof (ulong) is usually a valid
-         * address. Better pick an address known to be invalid on your
-         * system and assign it to CFG_RESET_ADDRESS.
-         */
-        addr = CFG_MONITOR_BASE - sizeof (ulong);
+	/*
+	 * note: when CFG_MONITOR_BASE points to a RAM address,
+	 * CFG_MONITOR_BASE - sizeof (ulong) is usually a valid
+	 * address. Better pick an address known to be invalid on your
+	 * system and assign it to CFG_RESET_ADDRESS.
+	 */
+	addr = CFG_MONITOR_BASE - sizeof (ulong);
 #endif
-        soft_restart(addr);
-        while(1);       /* not reached */
+	soft_restart(addr);
+	while(1);       /* not reached */
 }
